<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:a4j="http://richfaces.org/a4j"
      >

	<head>		
	  
	    <title>
	     FinA International
	    </title>
		<link href="../css/common.css" rel="stylesheet" type="text/css" />	
		<link href="../css/layout.css" rel="stylesheet" type="text/css" />	
		<link href="../css/jquery.autocomplete.css" rel="stylesheet" type="text/css" />	
		<script type="text/javascript" src="../js/jquery.layout.js"></script>
		
		<script type="text/javascript" src="../js/jquery.autocomplete.js"></script>
		<script type="text/javascript" src="../js/jquery.blockUI.js"></script>		
		<script type="text/javascript" language="javascript">

		var logoutUrl = 'main.seam';

		function logoutRedirect() {
		    document.location = logoutUrl; 
		}

		var timer = setTimeout('logoutRedirect()', 30*60*1000);

		function ajaxLoader(block) {
		    if (block) {
		        jQuery('#ajaxLoaderSmall').removeClass('hidden');
		    } else {
		        jQuery('#ajaxLoaderSmall').addClass('hidden');
		    }
		    
		    if (!jQuery('#ajaxLoaderSmall').is('.hidden')) {
		        clearTimeout(timer);
		        timer = setTimeout('logoutRedirect()', 30*60*1000);
		    }
		}

		function blockIframe() {
		    ajaxLoader(true);
		    jQuery('#targetIframeDiv').block({
		        message: jQuery('#ajaxLoadingDiv'),
		        overlayCSS: {opacity: '0.1', backgroundColor: '#000000'},
		        css: {border: '3px solid #9cabc1', padding: '5px', width: '250px'}
		    });
		}

		function unblockIframe() {
		    ajaxLoader(false);
		    jQuery('#targetIframeDiv').unblock();
		}

		function menuItemClicked(url) {
		    if (document.inQueue > 1) {
		        return false;
		    }
		    document.getElementById('targetIframe').src = url;
		    blockIframe();
		    isMenuActive = false;
		    return true;
		}

		document.pageName = "portal";
		var layoutSettings = {
		    applyDefaultStyles: true,
		    north__size: 60,
		    north__resizable: false,
		    north__showOverflowOnHover: true,           
		    west__minSize: 190,
		    west__size: 260,
		    west__maxSize: 300,
		    south__size: 17,
		    south__resizable: false,
		    south__closable: false,
		    south__spacing_open: 0,
		    west__slideTrigger_open: "mouseover"                    
		};

       
		var menuItems = [
		                                            
		                  ];
		        


		jQuery(document).ready(function () {
		    jQuery('body').layout(layoutSettings);

		    jQuery("#menuForm\\:suggestion").autocomplete(menuItems, {
		        minChars: 1,
		        width: 230,
		        scrollHeight: 400,
		        max: 20,
		        matchContains: true,
		        autoFill: false,
		        formatItem: function(row, i, max) {
		            return '<img src="'+'../'+row.icon+'" /> '+row.title;
		        },
		        formatMatch: function(row, i, max) {
		            return row.title;
		        },
		        formatResult: function(row) {
		            return row.title;
		        }
		    });

		    setEditIconsOnPanelMenus();

		    blockIframe();      
		});

		function setEditIconsOnPanelMenus() {
		    jQuery('#leftIconwestForm\\:favoritesMenu').attr('height',15);
		    jQuery('#leftIconwestForm\\:favoritesMenu').attr('width',16);
		    jQuery('#leftIconwestForm\\:favoritesMenu').attr('src','../images/favoritesAdd_icon.gif');
		    jQuery('#leftIconwestForm\\:favoritesMenu').click(function(){
		        Richfaces.showModalPanel('favoritesPanel');
		        return false;
		    });             
		    jQuery('#leftIconwestForm\\:recentItems').attr('height',13);
		    jQuery('#leftIconwestForm\\:recentItems').attr('width',13);             
		}
		document.inQueue = 0;
		
		function curUser() {
          return "kata";
	    }
        
		
        </script>
		
	</head>
	<body>
		<a4j:queue id="globalQueue" timeout="3000"  size="2" onsubmit="document.inQueue++;" oncomplete="document.inQueue--;" />
		
		<div id="targetIframeDiv" class="ui-layout-center" >
		<a4j:outputPanel id="mainFrame">	
			<iframe src="#{menuManager.pageUrl}" frameborder="0" id="targetIframe" style="width: 100%; height: 100%;" onload="unblockIframe();"/>
		</a4j:outputPanel>
		</div>
		
		<div class="ui-layout-north">
			<a4j:include viewId="/template/header.xhtml" />
		</div>
		
		<div class="ui-layout-west">
			<a4j:include viewId="/template/side.xhtml" />
		</div>
		
		<div class="ui-layout-south">
			<span id="powered" style="margin-right: 10px; color:#5e92df; font-size: 12px;">Copyright &copy; FinA LTD (<span style="font-size: 10px">Best Viewed In Mozilla Firefox 3+</span>)</span>
		</div>
		
		
		
	   
	    
	    
	    <div id="ajaxLoadingDiv">
	    	<center>
	    	<a4j:status onstop="unblockIframe()" />
    		<table>
    			<tr align="center">
    				<td style="font-size: 14px; font-weight: bold;">Please Wait</td>
    				<td><img src="../images/ajax-loader-point.gif" /></td>
    			</tr>
    		</table>
    		</center>
	    </div>
	   
	</body>

</html>